<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div>
            <h1>兼职外包列表</h1>
            <h2>
                <a href="<?php print U('Admin/blog/add');?>">添加</a>
                <a href="<?php print U('Admin/user/index');?>">返回欢迎界面</a>
            </h2>
          <table border='1' cellspacing='0'>
                <tr>
                    <th>用户名</th>
                    <th>title</th>
                    <th>image</th>
                    <th>body</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                    <th>操作</th>
                </tr>
                <?php foreach($data as $key=>$value){?>
                <tr>
                    <td><?php print $value['name'];?></td>
                    <td><?php print $value['title'];?></td>
                    <td><img src="/thinkphp/<?php print $value['image'];?>"></td>
                    <td><?php print html_entity_decode($value['body']);?></td>
                    <td><?php print date('Y-m-d',$value['create_time']);?></td>
                    <td><?php if($value['update_time']==0){
                        echo "NULL";}else{
                        print date('Y-m-d',$value['update_time']);}
                        ?>
                    </td>
                    <td>
                        <a href="<?php print U('Admin/blog/update?id='.$value['id']);?>">更新</a>
                        <a href="<?php print U('Admin/blog/delete?id='.$value['id']);?>">删除</a>
                    </td>
                </tr>
                <?php }?>
            </table>
        </div>
    </body>
</html>
